package com.study.common.constants;

/**
 * redis常量key
 */
public class RedisKey {

    public static final String USER_TOKEN = "USER_TOKEN:";

    public static final String MINI_TOKEN = "MINI_TOKEN:";

    public static final String CURRENT_USER = "CURRENT_USER:";

    public static final String REPEAT_SUBMIT = "REPEAT_SUBMIT:";

    public static final String MENU = "MENU:";

    public static String userToken(String token){
        return String.format("%s%s",USER_TOKEN,token);
    }

    public static String miniToken(String token){
        return String.format("%s%s", MINI_TOKEN, token);
    }

    public static String currentUser(String uuid){return String.format("%s%s",CURRENT_USER,uuid);}

    public static String menu(Integer id){return String.format("%s%s",MENU,id);}

    public static String repeatSubmit(String key){
        return String.format("%s%s",REPEAT_SUBMIT,key);
    }

}
